#include "unititem.h"

UnitItem::UnitItem(QGraphicsObject * parent): QGraphicsObject(parent)
{
}

UnitItem::~UnitItem()
{
}

QRectF UnitItem::boundingRect() const
{
    return QRectF(-25.5, -25.5, 51, 51);
}

void UnitItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
    painter->save();

    QBrush brush(Qt::red);
    brush.setStyle(Qt::SolidPattern);
    painter->setBrush(brush);
    QRectF sRect = QRectF(-25, -25, 50, 50);
    painter->drawEllipse(sRect);

    painter->restore();
}
